<?php
/**
 * cache_file class file
 *
 * @author tommy <streen003@gmail.com>
 * @copyright  Copyright (c) 2010 Tommy Software Studio
 * @link http://www.doitphp.com
 * @license New BSD License.{@link http://www.opensource.org/licenses/bsd-license.php}
 * @version $Id: cache_file.class.php 1.3 2011-11-13 21:27:01Z tommy $
 * @package lib
 * @since 1.0
 */

defined('IN_WORK') or exit();

class cache extends Work 
{
    public static $_instance;

	/**
	 * 单件模式调用方法
	 * 
	 * @static
	 * @var object
	 */
 	public static function getInstance($calss)
    {   
 		if (!isset(self::$_instance[$calss]))
        {
            import('work.libraries.cache.'.$calss);
 			self::$_instance[$calss] = new $calss();
 		}
		return self::$_instance[$calss];
	}
}